﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SAPbouiCOM;

namespace BoAddonBiz_FreightForwarder
{
    /// <summary>
    /// 问卷设置窗体
    /// </summary>
    /// <author>Webb.Wen</author>
    /// <lastedit>2011-07-20 13:44:54</lastedit>
    class B1Form_SurveyProgram : SAPBoAddon.B1Form
    {

        Matrix mtx_fct1;
        DBDataSource dbds_SurveyProgram;
        Matrix mtx_fct2;
        DBDataSource dbds_SurveyProgram2;


        public B1Form_SurveyProgram()
        {
            frm_ItemEvent += new SAPBoAddon.IB1FormEvents.B1ItemEventEventHandler(B1Form_SurveyProgram_frm_ItemEvent);
        }

        void B1Form_SurveyProgram_frm_ItemEvent(SAPBoAddon.B1AddonBase.B1ItemEvent pVal, ref bool BubbleEvent)
        {
            if (pVal.BeforeAction)
            {
                if (pVal.ItemUID == "mtx_0" && pVal.EventType == BoEventTypes.et_ITEM_PRESSED)
                {
                    if (pVal.FormMode == 1 && pVal.ColUID == "V_11" && pVal.Row == mtx_fct1.RowCount + 1)
                    {
                        SAPBoAddon.B1Assistant.Matrix.AutoAddNewLine(this.CurrentForm, pVal.ItemUID, "col_f", "@AVA_QS_QSP1", pVal.Row);
                        mtx_fct1.SetCellFocus(pVal.Row + 1, 2);
                        BubbleEvent = false;
                    }
                }

                if (pVal.ItemUID == "mtx_1" && pVal.EventType == BoEventTypes.et_ITEM_PRESSED)
                {
                    if (pVal.FormMode == 1 && pVal.ColUID == "V_11" && pVal.Row == mtx_fct1.RowCount + 1)
                    {
                        SAPBoAddon.B1Assistant.Matrix.AutoAddNewLine(this.CurrentForm, pVal.ItemUID, "col_f", "@AVA_QS_QSP2", pVal.Row);
                        mtx_fct1.SetCellFocus(pVal.Row + 1, 2);
                        BubbleEvent = false;
                    }
                }
            }
        }
        protected override bool BeforeSaveCheckFormData()
        {
            //流水号
            if (this.IsSerialNumNull())
            {
                ShowMessageInformation("23");
                return false;
            }
            //问卷方案名
            if (this.IsSurProNameNull())
            {
                ShowMessageInformation("12");
                return false;
            }
            //备注
            if (this.IsRemarksNull())
            {
                ShowMessageInformation("11");
                return false;
            }
            //单据
            if (this.IsDocEntryNull())
            {
                ShowMessageInformation("1000004");
                return false;
            }
            //过账日期
            if (this.IsDocDateNull())
            {
                ShowMessageInformation("22");
                return false;
            }
            //到账日期
            if (this.IsDocDueDateNull())
            {
                ShowMessageInformation("24");
                return false;
            }
            //凭证日期
            if (this.IsTaxDateNull())
            {
                ShowMessageInformation("9");
                return false;
            }
            //参考一
            if (this.IsReferenceResourcesOneNull())
            {
                ShowMessageInformation("17");
                return false;
            }
            //参考二
            if (this.IsReferenceResourcesTwoNull())
            {
                ShowMessageInformation("18");
                return false;
            }



            return CheckMatrix();
        }

        protected override void FormEditModeChange(SAPBoAddon.frmItemEditMode frmEditMode)
        {
            switch (frmEditMode)
            {
                case SAPBoAddon.frmItemEditMode.fe_AddMode:
                    this.Matrix_AutoAddLine();
                    break;
            }
        }

        protected override void FormInfoSetting(SAPBoAddon.B1FormSetting FormSetting)
        {
            //FormSetting.FormType = B1FormTypes.ado_AVA_QS_SurveyProgram;
            //FormSetting.FormFileName = B1FormTypes.ado_AVA_QS_SurveyProgram.ToString() + "Form.srf";





            FormSetting.AutoGetObjectNextNumber = true;
            FormSetting.MatrixSetting.MtxUID = "mtx_1";
            FormSetting.MatrixSetting.AutoAddNewLine = true;
            FormSetting.MatrixSetting.AutoLineKeyCol = "V_11";
            FormSetting.MatrixSetting.BeforeSaveDeleteNoValueLine = true;
            FormSetting.MatrixSetting.BeforeSaveFixDbDataSourceData = false;
            FormSetting.MatrixSetting.TableKeyField = "LineId";
            FormSetting.MatrixSetting.TableVisOrder = "VisOrder";
            FormSetting.MatrixSetting.PrimaryLineCol = "col_f";
            FormSetting.MatrixSetting.TableName = "@AVA_QS_QSP2";
            FormSetting.MatrixSetting.Add();



            FormSetting.AutoGetObjectNextNumber = true;
            FormSetting.MatrixSetting.MtxUID = "mtx_0";
            FormSetting.MatrixSetting.AutoAddNewLine = true;
            FormSetting.MatrixSetting.AutoLineKeyCol = "V_11";
            FormSetting.MatrixSetting.BeforeSaveDeleteNoValueLine = true;
            FormSetting.MatrixSetting.BeforeSaveFixDbDataSourceData = false;
            FormSetting.MatrixSetting.TableKeyField = "LineId";
            FormSetting.MatrixSetting.TableVisOrder = "VisOrder";
            FormSetting.MatrixSetting.PrimaryLineCol = "col_f";
            FormSetting.MatrixSetting.TableName = "@AVA_QS_QSP1";
            FormSetting.MatrixSetting.Add();


        }

        protected override void InitializeForm(SAPBoAddon.B1FormInitializePar InitPar)
        {
            mtx_fct1 = this.CurrentForm.Items.Item("mtx_0").Specific as Matrix;
            dbds_SurveyProgram = this.CurrentForm.DataSources.DBDataSources.Item("@AVA_QS_QSP1");

            mtx_fct2 = this.CurrentForm.Items.Item("mtx_1").Specific as Matrix;
            dbds_SurveyProgram2 = this.CurrentForm.DataSources.DBDataSources.Item("@AVA_QS_QSP2");
        }



        /// <summary>
        /// 判断流水号是否为空
        /// </summary>
        /// <returns></returns>
        private bool IsSerialNumNull()
        {
            bool RetVal = false;
            SAPbouiCOM.Form oFrom;
            oFrom = this.CurrentForm;
            string SerialNum = SAPBoAddon.B1Assistant.Item.GetValue(oFrom, "10").ToString();
            if (SerialNum.Trim().Length == 0)
            {
                RetVal = true;
            }
            return RetVal;
        }
        /// <summary>
        /// 判断单据编号是否为空
        /// </summary>
        /// <returns></returns>
        private bool IsDocEntryNull()
        {
            bool RetVal = false;
            SAPbouiCOM.Form oFrom;
            oFrom = this.CurrentForm;
            string DocEntry = SAPBoAddon.B1Assistant.Item.GetValue(oFrom, "1000005").ToString();
            if (DocEntry.Trim().Length == 0)
            {
                RetVal = true;
            }
            return RetVal;
        }
        /// <summary>
        /// 判断方案名称是否为空
        /// </summary>
        /// <returns></returns>
        private bool IsSurProNameNull()
        {
            bool RetVal = false;
            SAPbouiCOM.Form oFrom;
            oFrom = this.CurrentForm;
            string SurProName = SAPBoAddon.B1Assistant.Item.GetValue(oFrom, "13").ToString();
            if (SurProName.Trim().Length == 0)
            {
                RetVal = true;
            }
            return RetVal;
        }
        /// <summary>
        /// 判断过账日期是否为空
        /// </summary>
        /// <returns></returns>
        private bool IsDocDateNull()
        {
            bool RetVal = false;
            SAPbouiCOM.Form oFrom;
            oFrom = this.CurrentForm;
            string DocDate = SAPBoAddon.B1Assistant.Item.GetValue(oFrom, "20").ToString();
            if (DocDate.Trim().Length == 0)
            {
                RetVal = true;
            }
            return RetVal;
        }
        /// <summary>
        /// 判断到期日是否为空
        /// </summary>
        /// <returns></returns>
        private bool IsDocDueDateNull()
        {
            bool RetVal = false;
            SAPbouiCOM.Form oFrom;
            oFrom = this.CurrentForm;
            string DocDueDate = SAPBoAddon.B1Assistant.Item.GetValue(oFrom, "19").ToString();
            if (DocDueDate.Trim().Length == 0)
            {
                RetVal = true;
            }
            return RetVal;
        }
        /// <summary>
        /// 判断凭证日期是否为空
        /// </summary>
        /// <returns></returns>
        private bool IsTaxDateNull()
        {
            bool RetVal = false;
            SAPbouiCOM.Form oFrom;
            oFrom = this.CurrentForm;
            string TaxDate = SAPBoAddon.B1Assistant.Item.GetValue(oFrom, "21").ToString();
            if (TaxDate.Trim().Length == 0)
            {
                RetVal = true;
            }
            return RetVal;
        }

        /// <summary>
        /// 判断参考一是否为空
        /// </summary>
        /// <returns></returns>
        private bool IsReferenceResourcesOneNull()
        {
            bool RetVal = false;
            SAPbouiCOM.Form oFrom;
            oFrom = this.CurrentForm;
            string ReferenceResourcesOne = SAPBoAddon.B1Assistant.Item.GetValue(oFrom, "16").ToString();
            if (ReferenceResourcesOne.Trim().Length == 0)
            {
                RetVal = true;
            }
            return RetVal;
        }
        /// <summary>
        /// 判断参考二是否为空
        /// </summary>
        /// <returns></returns>
        private bool IsReferenceResourcesTwoNull()
        {
            bool RetVal = false;
            SAPbouiCOM.Form oFrom;
            oFrom = this.CurrentForm;
            string ReferenceResourcesTwo = SAPBoAddon.B1Assistant.Item.GetValue(oFrom, "1000003").ToString();
            if (ReferenceResourcesTwo.Trim().Length == 0)
            {
                RetVal = true;
            }
            return RetVal;
        }

        /// <summary>
        /// 判断问卷调查结果是否为空
        /// </summary>
        /// <returns></returns>
        private bool IsRemarksNull()
        {
            bool RetVal = false;
            SAPbouiCOM.Form oFrom;
            oFrom = this.CurrentForm;
            string Remarks = SAPBoAddon.B1Assistant.Item.GetValue(oFrom, "1000002").ToString();
            if (Remarks.Trim().Length == 0)
            {
                RetVal = true;
            }
            return RetVal;
        }


        /// <summary>
        /// 显示中文信息还是英文提示信息
        /// </summary>
        /// <param name="UItemId"></param>
        private void ShowMessageInformation(string UItemId)
        {
            SAPbouiCOM.Form oFrom;
            oFrom = this.CurrentForm;
            string information = SAPBoAddon.B1Assistant.Item.GetValue(oFrom, UItemId).ToString();
            if (SBOCompany.language.ToString().Trim().Contains("Chinese"))
                SBOApp.StatusBar.SetText(information + "不能为空！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
            else
                SBOApp.StatusBar.SetText(information + " IS NOT NULL！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
        }



        //判断Matrix
        private bool CheckMatrix()
        {
            SAPbouiCOM.Form oFrom;
            oFrom = this.CurrentForm;
            SAPbouiCOM.Matrix oMtx;
            SAPbouiCOM.Matrix oMtx2;
            //SAPbouiCOM.DBDataSource oDbds = null;
            //SAPbouiCOM.DBDataSource oDbds2 = null;
            //oDbds = oFrom.DataSources.DBDataSources.Item("@AVA_QS_QSP1");

            //问卷调查题目设置
            oMtx = oFrom.Items.Item("1000001").Specific;
            if (oMtx.RowCount == 0)
            {
                string title = SAPBoAddon.B1Assistant.Item.GetValue(oFrom, "6").ToString();
                if (SBOCompany.language.ToString().Trim().Contains("Chinese"))
                    SBOApp.StatusBar.SetText(title + "不能为空！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
                else
                    SBOApp.StatusBar.SetText(title + " IS NOT NULL！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
                return false;
            }

            //问卷调查结果设置
            oMtx2 = oFrom.Items.Item("7").Specific;
            if (oMtx2.RowCount == 0)
            {
                string title = SAPBoAddon.B1Assistant.Item.GetValue(oFrom, "5").ToString();
                if (SBOCompany.language.ToString().Trim().Contains("Chinese"))
                    SBOApp.StatusBar.SetText(title + "不能为空！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
                else
                    SBOApp.StatusBar.SetText(title + " IS NOT NULL！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
                return false;
            }

            //问卷调查题目设置
            for (int i = 1; i <= oMtx.RowCount; i++)
            {
                string QuestionsCode = oMtx.Columns.Item("V_1").Cells.Item(i).Specific.Value.ToString();
                string Questions = oMtx.Columns.Item("V_4").Cells.Item(i).Specific.Value.ToString();
                string Remarks = oMtx.Columns.Item("V_3").Cells.Item(i).Specific.Value.ToString();

                if (QuestionsCode.Trim().Length == 0)
                {
                    if (SBOCompany.language.ToString().Trim().Contains("Chinese"))
                        SBOApp.StatusBar.SetText("题目编码不能为空！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
                    else
                        SBOApp.StatusBar.SetText("QuestionsCode IS NOT NULL！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
                    return false;
                }

                if (Questions.Trim().Length == 0)
                {
                    if (SBOCompany.language.ToString().Trim().Contains("Chinese"))
                        SBOApp.StatusBar.SetText("题目不能为空！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
                    else
                        SBOApp.StatusBar.SetText("Questions IS NOT NULL！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
                    return false;
                }

                if (Remarks.Trim().Length == 0)
                {
                    if (SBOCompany.language.ToString().Trim().Contains("Chinese"))
                        SBOApp.StatusBar.SetText("备注不能为空！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
                    else
                        SBOApp.StatusBar.SetText("Remarks IS NOT NULL！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
                    return false;
                }

            }


            for (int i = 1; i <= oMtx2.RowCount; i++)
            {
                string QuestionsCode = oMtx2.Columns.Item("V_0").Cells.Item(i).Specific.Value.ToString();
                //string IsEdit = oMtx2.Columns.Item("V_3").Cells.Item(i).Specific.Value.ToString();
                string ResultsC = oMtx2.Columns.Item("V_2").Cells.Item(i).Specific.Value.ToString(); ;
                string Results = oMtx2.Columns.Item("V_6").Cells.Item(i).Specific.Value.ToString();
                string Remarks = oMtx2.Columns.Item("V_5").Cells.Item(i).Specific.Value.ToString();
                if (QuestionsCode.Trim().Length == 0)
                {
                    if (SBOCompany.language.ToString().Trim().Contains("Chinese"))
                        SBOApp.StatusBar.SetText("题目编码不能为空！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
                    else
                        SBOApp.StatusBar.SetText("QuestionsCode IS NOT NULL！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
                    return false;
                }

                //if (IsEdit.Trim().Length == 0)
                //{
                //    if (SBOCompany.language.ToString().Trim().Contains("Chinese"))
                //        SBOApp.StatusBar.SetText("录入方式不能为空！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
                //    else
                //        SBOApp.StatusBar.SetText("EntryMode IS NOT NULL！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
                //    return false;
                //}

                if (ResultsC.Trim().Length == 0)
                {
                    if (SBOCompany.language.ToString().Trim().Contains("Chinese"))
                        SBOApp.StatusBar.SetText("调查结果选项编码不能为空！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
                    else
                        SBOApp.StatusBar.SetText("ResultCode IS NOT NULL！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
                    return false;
                }

                if (Results.Trim().Length == 0)
                {
                    if (SBOCompany.language.ToString().Trim().Contains("Chinese"))
                        SBOApp.StatusBar.SetText("调查结果选项内容不能为空！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
                    else
                        SBOApp.StatusBar.SetText("ResultContent IS NOT NULL！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
                    return false;
                }
                if (Remarks.Trim().Length == 0)
                {
                    if (SBOCompany.language.ToString().Trim().Contains("Chinese"))
                        SBOApp.StatusBar.SetText("备注不能为空！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
                    else
                        SBOApp.StatusBar.SetText("Remarks IS NOT NULL！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
                    return false;
                }
            }




            #region 注释DBDS判断
            ////问卷调查题目设置
            //for (int i = 0; i <= oDbds.Size - 1; i++)
            //{
            //    string QuestionsCode = oDbds.GetValue("U_QuestionsCode", i);
            //    string Questions = oDbds.GetValue("U_QuestionsName", i);
            //    string Remarks = oDbds.GetValue("U_Remarks", i);
            //    if (QuestionsCode.Trim().Length == 0)
            //    {
            //        if (SBOCompany.language.ToString().Trim().Contains("Chinese"))
            //            SBOApp.StatusBar.SetText("题目编码不能为空！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
            //        else
            //            SBOApp.StatusBar.SetText("QuestionsCode IS NOT NULL！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
            //        return false;
            //    }

            //    if (Questions.Trim().Length == 0)
            //    {
            //        if (SBOCompany.language.ToString().Trim().Contains("Chinese"))
            //            SBOApp.StatusBar.SetText("题目不能为空！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
            //        else
            //            SBOApp.StatusBar.SetText("Questions IS NOT NULL！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
            //        return false;
            //    }

            //    if (Remarks.Trim().Length == 0)
            //    {
            //        if (SBOCompany.language.ToString().Trim().Contains("Chinese"))
            //            SBOApp.StatusBar.SetText("备注不能为空！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
            //        else
            //            SBOApp.StatusBar.SetText("Remarks IS NOT NULL！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
            //        return false;
            //    }

            //}
            ////问卷调查结果设置
            //oDbds2 = oFrom.DataSources.DBDataSources.Item("@AVA_QS_QSP2");

            //for (int i = 0; i <= oDbds2.Size - 1; i++)
            //{
            //    string QuestionsCode = oDbds2.GetValue("U_Lineid", i);
            //    string IsEdit = oDbds2.GetValue("U_IsEdit", i);
            //    string ResultsC = oDbds2.GetValue("U_ResultsC", i);
            //    string Results = oDbds2.GetValue("U_Results", i);
            //    string Remarks = oDbds2.GetValue("U_Remarks", i);
            //    if (QuestionsCode.Trim().Length == 0)
            //    {
            //        if (SBOCompany.language.ToString().Trim().Contains("Chinese"))
            //            SBOApp.StatusBar.SetText("题目编码不能为空！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
            //        else
            //            SBOApp.StatusBar.SetText("QuestionsCode IS NOT NULL！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
            //        return false;
            //    }

            //    if (IsEdit.Trim().Length == 0)
            //    {
            //        if (SBOCompany.language.ToString().Trim().Contains("Chinese"))
            //            SBOApp.StatusBar.SetText("录入方式不能为空！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
            //        else
            //            SBOApp.StatusBar.SetText("EntryMode IS NOT NULL！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
            //        return false;
            //    }

            //    if (ResultsC.Trim().Length == 0)
            //    {
            //        if (SBOCompany.language.ToString().Trim().Contains("Chinese"))
            //            SBOApp.StatusBar.SetText("调查结果选项编码不能为空！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
            //        else
            //            SBOApp.StatusBar.SetText("ResultCode IS NOT NULL！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
            //        return false;
            //    }

            //    if (Results.Trim().Length == 0)
            //    {
            //        if (SBOCompany.language.ToString().Trim().Contains("Chinese"))
            //            SBOApp.StatusBar.SetText("调查结果选项内容不能为空！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
            //        else
            //            SBOApp.StatusBar.SetText("ResultContent IS NOT NULL！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
            //        return false;
            //    }
            //    if (Remarks.Trim().Length == 0)
            //    {
            //        if (SBOCompany.language.ToString().Trim().Contains("Chinese"))
            //            SBOApp.StatusBar.SetText("备注不能为空！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
            //        else
            //            SBOApp.StatusBar.SetText("Remarks IS NOT NULL！", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
            //        return false;
            //    }
            //}
            #endregion





            return true;


        }

    }
}
